#ifndef __TURN_H__
#define __TURN_H__

#include "InvertibleMatrix.hpp"
#include <iostream>

class Turn
{
public:
	Turn( unsigned int turn );
	Turn( std::istream& in );
	~Turn();

	void setMatrix( const InvertibleMatrix& matrix );
	void setShot( const Vector& shot );
	const InvertibleMatrix& getMatrix() const;
	const Vector& getShot() const;

	unsigned int number() const;

	std::ostream& write( std::ostream& out ) const;

	static void dimensions( unsigned int dim );
	static void position( const Vector& pos );
	static const Vector& position();
	static unsigned int dimensions();

private:
	unsigned int _turn;
	const InvertibleMatrix* _matrix;
	const Vector* _shot;
	bool _own_matrix, _own_shot;

	static unsigned int _dimensions;
	static const Vector* _position;

};

std::ostream& operator<< ( std::ostream& out, const Turn& t );

#endif

